package no.ffi.gismoidm.attrex;

import java.util.Properties;

/**
 *
 * @author anders
 */
public class BooleanValue implements BooleanOperand {

    private Boolean value; // Does not apply to subclasses
    public BooleanValue(Boolean value) { this.value = value; }
    public BooleanValue getBooleanValue(Properties attributes) throws AttributeEvaluationException {
        return this;
    }
    
    public String toString() { return value.toString(); }
    public Boolean truthValue() { return value; }
    
    public boolean equals(Object o, Properties prop) {
        if (o instanceof BooleanValue) {
            BooleanValue bo = (BooleanValue)o;
            return bo.value.equals(value);
        }
        return true;
    }
    
}
